-- GENERATED SPELL FOR [Cursed Offspring of Har'koa] --


function spell0_28404(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(27048,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28404', 0, 1)
end

function spell1_28404(pUnit, Event) --@Curse of Blood,n/a--
pUnit:FullCastSpellOnTarget(54604,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28404', 627, 1)
end

function spell2_28404(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(27047,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28404', 0, 1)
end

function spell3_28404(pUnit, Event) --@Prowl,Self--
pUnit:FullCastSpellOnTarget(24453,pUnit)
pUnit:RegisterEvent('Sorts_28404', 0, 1)
end

function spell4_28404(pUnit, Event) --@Rake,n/a--
pUnit:FullCastSpellOnTarget(59885,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28404', 9000, 1)
end

function Sorts_28404(pUnit, Event)
local choix_sorts_28404 = math.random(0, 4)
if choix_sorts_28404 == 0 then
pUnit:RegisterEvent('spell0_28404', 1, 1)
end
if choix_sorts_28404 == 1 then
pUnit:RegisterEvent('spell1_28404', 1, 1)
end
if choix_sorts_28404 == 2 then
pUnit:RegisterEvent('spell2_28404', 1, 1)
end
if choix_sorts_28404 == 3 then
pUnit:RegisterEvent('spell3_28404', 1, 1)
end
if choix_sorts_28404 == 4 then
pUnit:RegisterEvent('spell4_28404', 1, 1)
end
end

function mob28404_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28404', math.random(1500, 3000), 1)
end

function mob28404_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28404_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28404_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28404, 1, 'mob28404_Action')
RegisterUnitEvent(28404, 2, 'mob28404_Leave')
RegisterUnitEvent(28404, 3, 'mob28404_Kill')
RegisterUnitEvent(28404, 4, 'mob28404_Die')
